package cn.hist.hfp.exception;

public enum ErrorCode {

    RESOURCE_NOT_FOUND("0001", "The requested resource can't be found"),
    PERMISSION_DENIED("0002", "You don't have the permission"),
    INFO_EXPIRED("0003", "Login information expired"),
    VALIDATION_FAILED("0004", "LoginName or Password is wrong"),

    NO_SUCH_ALGORITHM("1001", "Internal error occurred: No such algorithm"),

    EMPTY_FILE("0005", "The uploaded file is empty"),
    SIZE_LIMIT_EXCEEDED("0006", "File size exceed the limit"),

    UNKNOWN_ERROR("9999", "Undefined error occurred");

    private String code;
    private String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
